#ifndef CONTEXTMENUTRIGGER_H
#define CONTEXTMENUTRIGGER_H

#include <QtCore/QObject>

class QMouseEvent;
class QWidget;
class ContextMenuTrigger : public QObject
{
	Q_OBJECT

public:
	ContextMenuTrigger(QWidget *widget);
	virtual ~ContextMenuTrigger();

protected:
     virtual bool eventFilter(QObject *obj, QEvent *event) override;

private:
	QWidget* const _widget;
	void onMouseButtonPress(QMouseEvent*);
	void onMouseButtonRelease(QMouseEvent*);

	bool _isLeftBtnPressed;
};

#endif // CONTEXTMENUTRIGGER_H
